s = 0
for i in range(99,999):
    a = i%10
    b = i//10%10
    c = i//100
    d = a**3 + b**3 + c**3
    if i == d :
        s += 1
        print(i)